package co.fitstart.admin.web.controller.finance;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.demo2do.core.support.Page;

import co.fitstart.admin.service.OrderService;
import co.fitstart.admin.web.interceptor.MenuSetting;
import co.fitstart.entity.finance.InvoiceExportRecord;

@Controller
@RequestMapping("/invoice-export-records")
@MenuSetting("menu-finance")
public class InvoiceExportRecordController {
    
    @Autowired
    private OrderService orderService;
    
    /**
     * 
     * @param page
     * @return
     */
    @RequestMapping(value = "", method = RequestMethod.GET)
    @MenuSetting("submenu-invoice-record")
    public ModelAndView list(Page page) {
        ModelAndView modelAndView = new ModelAndView("finance/invoice-export-record-list");
        
        List<InvoiceExportRecord> records = orderService.listInvoiceExportRecord(page);
        modelAndView.addObject("records", records);
        
        modelAndView.addObject("page", page);
        
        return modelAndView;
        
    }

}
